// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
import Test from '@/views/system/Test'
/**
 * 基础菜单
 */
//默认主页
import Home from '@/views/home/Home'
//普通用户页面
//部门主管页面
//超级管理员页面
import UserCenter from '@/views/system/UserCenter'
import DockerHostManagement from '@/views/client/DockerHostManagement'
import DockerClientInfo from '@/views/client/DockerClientInfo'
import ContainersManagement from '@/views/container/ContainersManagement'
import ContainerInfo from '@/views/container/ContainerInfo'
import ContainerTerminal from '@/views/container/ContainerTerminal'

import Goods from '@/views/goods/Goods';


// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [
            {
                path: '/home/Home',
                name: '主页',
                component: Home,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/home/Test',
                name: '测试中心',
                component: Test,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/system/UserCenter',
                name: '用户中心',
                component: UserCenter,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/client/DockerHostManagement',
                name: 'Docker主机管理',
                component: DockerHostManagement,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/client/DockerClientInfo',
                name: 'Docker信息',
                component: DockerClientInfo,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/container/ContainersManagement',
                name: '容器管理',
                component: ContainersManagement,
                meta: {
                    requireAuth: true
                }
            }, {
                path: '/container/ContainerInfo',
                name: '容器信息',
                component: ContainerInfo,
                meta: {
                    requireAuth: true
                }
            },, {
                path: '/container/ContainerTerminal',
                name: '容器SSH',
                component: ContainerTerminal,
                meta: {
                    requireAuth: true
                }
            },
           
            {
                path: '/goods/Goods',
                name: '商品管理',
                component: Goods,
                meta: {
                    requireAuth: true
                }
            }
        ]
    }]
})